<div class="cat_page">
  <div class="def_div f_left">
  <?php
  		if(isset($order_detail) and ($order_detail))
			{
  ?>
    <div class="item_list_show">
      <h2>Order History </h2>
      <div class="def_div f_left">
        <div class="def_div f_left">
          <div class="acc_form_1">Order tracking ID :</div>
          <div class="acc_form_2"> <span class="sellTextinfo"><?php echo $order_detail['Order']['tracking_id']; ?></span> </div>
        </div>
        <div class="def_div f_left">
          <div class="acc_form_1">Order Status :</div>
          <div class="acc_form_2"> <span class="sellTextinfo">
		  <?php 
				  if($order_detail['Order']['payment_status']==1){ echo "Paid";}else{ echo "UnPaid";} 
		  ?>
          </span> </div>
        </div>
        <div class="def_div f_left">
          <div class="acc_form_1">Order Customer :</div>
          <div class="acc_form_2"> <span class="sellTextinfo"><?php echo $order_detail['User']['name']; ?></span> </div>
        </div>
        <div class="def_div f_left">
          <div class="acc_form_1">Order Total Price :</div>
          <div class="acc_form_2"> <span class="sellTextinfo">$<?php echo $order_detail['Order']['total_price']; ?></span> </div>
        </div>
        <div class="def_div f_left">
          <div class="acc_form_1">Order Payment Method:</div>
          <div class="acc_form_2"> <span class="sellTextinfo"><?php echo $order_detail['Order']['payment_method']; ?></span> </div>
        </div>
        <div class="def_div f_left">
          <div class="acc_form_1">Order Date :</div>
          <div class="acc_form_2"> <span class="sellTextinfo"><?php echo $order_detail['Order']['created']; ?></span> </div>
        </div>
        <div class="def_div f_left">
          <div class="acc_form_1">Shipping Address :</div>
          <div class="acc_form_2"> <span class="sellTextinfo">
		  <?php echo $order_detail['Address']['name'].','.$order_detail['Address']['add1'].','.
		  $order_detail['Address']['add2'].', '. $order_detail['Address']['city'].', '.$order_detail['Address']['state'].', 
		  '.$order_detail['Address']['zip'].''.$order_detail['Address']['phone']; ?></span> </div>
        </div>
      </div>
    </div>
                <div class="item_list_show">
                  <h2>Order Items </h2>
                  <div class="def_div f_left">
                  <?php
				  		if(isset($order_items) and ($order_items))
						{
				  ?>
                    <table width="100%" cellspacing="0" cellpadding="0" border="0" class="grid_table_list_3">
                      <tbody>
                        <tr class="tGb_blk">
                          <th width="10%">&nbsp;</th>
                          <th width="40%">Item Name</th>
                          <th width="20%">Quanity</th>
                          <th width="25%">Prices</th>
                        </tr>
                        <?php
						$x=1;
					   foreach($order_items as $product)
							{
						?>
                        <tr>
                        <tr bgcolor="#f3f3f3">
                          <td width="10%"><b><?php echo $x; ?>.</b></td>
                          <td width="40%"><b>
						  <?php echo $html->link($product['Product']['name'],
						  array('controller'=>'products','action'=>'product',$product['Product']['slug']),array('class'=>''));?>
						  </b></td>
                          <td width="20%"><b><?php echo $product['OrderItem']['qty']; ?></b></td>
                          <td width="25%"><b>$<?php echo $product['OrderItem']['price']; ?></b></td>
                        </tr>
                        <?php
							$x++;
							}
						?>
                      </tbody>
                    </table>
                    <?php
						}
					?>
                  </div>
                </div>
    <?php
		    }
	?>
  </div>
</div>
<div class="pad_10"></div>
<div class="common_border"></div>